<?php


namespace App\Entity\Teacher;


use App\Entity\BaseEntity;

/**
 * Class TeacherDto
 * @package App\Entity\Teacher
 * @property string $name
 * @property string $province
 * @property string $city
 * @property string $district
 * @property int $schoolId
 * @property array $classes
 *
 */
class TeacherDto extends BaseEntity
{
    public function rules(): array
    {
        return [
            'name' => 'required',
            'schoolId' => 'required',
            'classes' => 'required|array',
        ];
    }

    public function messages(): array
    {
        return [
            'name.required' => '请输入真实姓名',
            'schoolId.required' => '请选择所有学校',
            'classes.required' => '请输入班级',
        ];
    }
}
